package com.zy.mc_module.ui.main.forget;

import com.zy.mc_module.mvp.bean.BaseBean;
import com.zy.mc_module.utils.MD5;
import com.zy.mc_module.utils.retrofit.RetrofitManager;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;

/**
 * Created on 2019/01/03
 */
public class ForgetModel implements ForgetContract.Model {
    @Override
    public Observable<BaseBean> forget(Object... objects) {
        Map<String, Object> map = new HashMap<>();
        map.put("phone", objects[0]);
        map.put("code", objects[1]);
        map.put("password", MD5.md5((String) objects[2]));
        return RetrofitManager.getInstance().getApi().forgetPW(map);
    }
}
